package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/Replenishment")
public class WmsManualDriveReplenishmentRouter {
    @Autowired
    SysMenuService menuService;
    //人工驱动补货页面
    @RequestMapping(value = "/manualDriveReplenishment/{menu}")
    public  String  tomanualDriveReplenishment(@PathVariable("menu") String menu, Model model){
        model.addAttribute("functions",menuService.getFunctions(menu));
        return "stock/manualDriveReplenishment/manualDriveReplenishment";
    }
    /*跳转到详情页面*/
    @RequestMapping(value = "/selectReplenishment")
    public String selectPickingTask(String [] ids, Model model) {
            model.addAttribute("ids", ids);
        return "stock/manualDriveReplenishment/selectReplenishment";
    }
    /*跳转到修改页面*/
    @RequestMapping(value = "/editReplenishment")
    public String editReplenishment(String id,String bh, Model model) {
        model.addAttribute("id",id);
        model.addAttribute("bh",bh);
        return "stock/manualDriveReplenishment/editReplenishment";
    }
    /*跳转查看补货任务页面*/
    @RequestMapping(value = "/searchReplenishment")
    public String searchReplenishment(String sczt,String bhid, Model model) {
        model.addAttribute("sczt", sczt);
        model.addAttribute("bhid", bhid);
        return "stock/manualDriveReplenishment/searchReplenishment";
    }
    //添加补货单
    @RequestMapping(value = "/addReplenishment")
    public  String addReplenishment(){
        return "stock/manualDriveReplenishment/addReplenishment";
    }
    /*跳转到下发补货任务页面*/
    @RequestMapping(value = "/createReplenishment")
    public String createReplenishment(String id, Model model) {
        model.addAttribute("id",id);
        return "stock/manualDriveReplenishment/createReplenishment";
    }
}
